using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerIdleState : PlayerGroundState
{

    public PlayerIdleState(Player playerBase, PlayerStateMachine playerStateMachine, string animBoolName) : base(playerBase, playerStateMachine, animBoolName)
    { 
    }


    public override void Enter()
    {
        base.Enter();
        player.SetZeroVelocity();
    }

    public override void Exit()
    {
        base.Exit();

    }

    public override void Update()
    {
        base.Update();
        if (xInput == player.faceDir && player.IsWall())
            return;
        if (xInput != 0&&!player.isBusy)
        {
            playerStateMachine.ChangeState(player.playerMoveState);
        }
    }
}
